import Vue from 'vue'
import {getshang} from '../api'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    ip: 'http://127.0.0.1:7001',
    tableData:[]
  },
  mutations: {
    SET_SHANG_FN(state,data){
        state.tableData =data
     
    },
  },
  actions: {
    GET_SHANG_FN({commit}) {
      getshang().then(res => {
        commit('SET_SHANG_FN',res.data)
      })
    },
   
  
   
  },
  modules: {
  }
})
